package com.ruoyi.yunxin.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yunxin.mapper.MiddleNotifyMapper;
import com.ruoyi.yunxin.domain.MiddleNotify;
import com.ruoyi.yunxin.service.IMiddleNotifyService;

/**
 * 通话记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-29
 */
@Service
public class MiddleNotifyServiceImpl implements IMiddleNotifyService 
{
    @Autowired
    private MiddleNotifyMapper middleNotifyMapper;

    /**
     * 查询通话记录
     * 
     * @param id 通话记录主键
     * @return 通话记录
     */
    @Override
    public MiddleNotify selectMiddleNotifyById(Long id)
    {
        return middleNotifyMapper.selectMiddleNotifyById(id);
    }

    /**
     * 查询通话记录列表
     * 
     * @param middleNotify 通话记录
     * @return 通话记录
     */
    @Override
    public List<MiddleNotify> selectMiddleNotifyList(MiddleNotify middleNotify)
    {
        return middleNotifyMapper.selectMiddleNotifyList(middleNotify);
    }

    /**
     * 新增通话记录
     * 
     * @param middleNotify 通话记录
     * @return 结果
     */
    @Override
    public int insertMiddleNotify(MiddleNotify middleNotify)
    {
        middleNotify.setCreateTime(DateUtils.getNowDate());
        return middleNotifyMapper.insertMiddleNotify(middleNotify);
    }

    /**
     * 修改通话记录
     * 
     * @param middleNotify 通话记录
     * @return 结果
     */
    @Override
    public int updateMiddleNotify(MiddleNotify middleNotify)
    {
        middleNotify.setUpdateTime(DateUtils.getNowDate());
        return middleNotifyMapper.updateMiddleNotify(middleNotify);
    }

    /**
     * 批量删除通话记录
     * 
     * @param ids 需要删除的通话记录主键
     * @return 结果
     */
    @Override
    public int deleteMiddleNotifyByIds(Long[] ids)
    {
        return middleNotifyMapper.deleteMiddleNotifyByIds(ids);
    }

    /**
     * 删除通话记录信息
     * 
     * @param id 通话记录主键
     * @return 结果
     */
    @Override
    public int deleteMiddleNotifyById(Long id)
    {
        return middleNotifyMapper.deleteMiddleNotifyById(id);
    }
}
